from django.conf.urls.defaults import *

args = {'template_name': 'promisecheck'}

urlpatterns = patterns('promisecheck.views',
    (r'^$', 'views.index', args),
    (r'^candidates/$', 'views.people', args),
    (r'^promises/$', 'views.promises', args),
    (r'^cycles/$', 'views.cycles', args),

    (r'^promises/list/(?P<person>[\w-]*)/(?P<status>[\w]*)$', 'views.promise_list', args),
    (r'^promise/(?P<promise>[0-9]+)$', 'views.promise', args),

    (r'^person/(?P<slug>[\w-]+)$', 'views.person', args),

    (r'^cycle/(\d+)$', 'views.cycle', args),

    (r'^promises/add/(?P<person>[\w-]+)$', 'views.add_promise', args),
    (r'^promise/(?P<promise>[0-9]+)/update$', 'views.update_promise', args),
    (r'^api/add_promise/(?P<person>[\w-]+)$', 'actions.add_promise', args),
    (r'^api/update_promise/(?P<promise>\d+)$', 'actions.add_log', args),
    (r'^charts/pie$', 'charts.pie_chart', args),
    (r'^charts/line$', 'charts.line_chart', args),
)
